/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：BattleStateInfo.java <br>
 * 创建时间：2015年4月29日 下午2:34:57 <br>
 * 所属项目：GmudEX <br>
 * @author 12548
 */
package lostland.gmud.exv2.battle;

import java.io.Serializable;

import lostland.gmud.exv2.battle.netbattle.NetworkMode;
import lostland.gmud.exv2.data.Room;

/**
 * 类名：BattleStateInfo <br>
 * 说明：
 *
 * @author 12548
 */
public class BattleStateInfo implements Serializable {


	private static final long serialVersionUID = -774160458369762707L;

	public int host_sp;
	public int host_hp;
	public int host_maxhp;
	public int host_fp;
	public int host_maxfp;
	public int host_gauge;

	public int client_sp;
	public int client_hp;
	public int client_maxhp;
	public int client_fp;
	public int client_maxfp;
	public int client_gauge;

	public static BattleStateInfo getState() {

		BattleStateInfo state = new BattleStateInfo();
		BattleScreen bi = BattleScreen.getInstance();

		if (bi.networkMode == NetworkMode.HOST) {
			state.client_fp = bi.p2().getFp();
			state.client_gauge = bi.p2().getGauge();
			state.client_hp = bi.p2().getHp();
			state.client_maxfp = bi.p2().maxfp;
			state.client_maxhp = bi.p2().getAttr(Room.ATTR_MAXHP);
			state.client_sp = bi.p2().getSp();
			state.host_fp = bi.p1().getFp();
			state.host_gauge = bi.p1().getGauge();
			state.host_hp = bi.p1().getHp();
			state.host_maxfp = bi.p1().maxfp;
			state.host_maxhp = bi.p1().getAttr(Room.ATTR_MAXHP);
			state.host_sp = bi.p1().getSp();
		} else {
			state.client_fp = bi.p1().getFp();
			state.client_gauge = bi.p1().getGauge();
			state.client_hp = bi.p1().getHp();
			state.client_maxfp = bi.p1().maxfp;
			state.client_maxhp = bi.p1().getAttr(Room.ATTR_MAXHP);
			state.client_sp = bi.p1().getSp();
			state.host_fp = bi.p2().getFp();
			state.host_gauge = bi.p2().getGauge();
			state.host_hp = bi.p2().getHp();
			state.host_maxfp = bi.p2().maxfp;
			state.host_maxhp = bi.p2().getAttr(Room.ATTR_MAXHP);
			state.host_sp = bi.p2().getSp();
		}
		return state;
	}


	private BattleStateInfo() {

	}

}
